<template>
<div>

</div>
</template>

<script>
import {createWithholdSign} from "../../common/http";

export default {
  name: "paytop",
  data() {
    return {
      id:0,
    }
  },
  onLoad(option) {
    console.log(option);
    let options = my.getLaunchOptionsSync();
    console.log(options)
    if(options.query){
      this.id = options.query.id
    }else{
      this.id = option.id
    }
    // console.log(options.query.id)
    createWithholdSign({id:this.id}).then(res=>{
      if(res.data.code == 0){
        my.navigateToMiniProgram({
          appId: "2021001152620480", // 区块链合同真实appId
          path: "pages/tripartite/index", // 支付宝商家跳转区块链合同代扣签署地址（真实路径
          query: {
            signStr: res.data.data.signStr,
            tenantId: "UCWXTIGM",
            merchantId: "91120116MADAK4NN4B",
            orderId: res.data.data.orderId,
            redirectUrl: res.data.data.redirectUrl,
          }, // 需要携带的必要参数
          success: (res1) => {
            console.log(res1)
          },
          fail: (error) => {
            console.log(error)
          },
        });
      }
    })

  },
}
</script>

<style scoped>

</style>